<template>
	<view class="pl-30 pr-30 pt-45">
		<view class="white size-36 ">{{ details.title }}</view>
		<view class="color-9 mt-30 mb-30">{{ details.updatetime }}</view>
		<view class="white" v-html="details.content"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:null,
				details:{}
			};
		},
		methods:{
			getDetails() {
				this.$http('api/Newapi/yuanYuZhouDetail',{id:this.id}).then(res=>{
					
					res.content =  res.content.replace(/<\s?img/g,"<img style='width:100%;display:block'").replace(/<img\sstyle='width:100%'(.*?)width=['|"](.*?)['|"](.*?)>/g,"<img style='width:100%'$1$3>").replace(/<img\sstyle='width:100%'(.*?)height=['|"](.*?)['|"](.*?)>/g,"<img style='width:100%'$1$3>")
					this.details = res
				})
			}
		},
		onLoad ({id}) {
			this.id = id
			this.getDetails()
		}
	}
</script>
<style>
	page {
		background: #f5f5f5;
	}
</style>
<style lang="scss">
	.white {
		color: #3c3c3c;
	}
</style>
